package com.corelib.eventbus;

import android.content.Intent;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;

import com.corelib.BaseActivity;
import com.corelib.R;
import com.corelib.eventbus.event.MessageEvent;

import org.greenrobot.eventbus.EventBus;

import butterknife.BindView;

public class EventTwo extends BaseActivity {
    @BindView(R.id.finish)
    Button finish;


    @Override
    protected int inflateLayoutId() {
        return R.layout.activity_event_two;
    }

    @Override
    protected void initViews(Bundle savedInstanceState) {
        finish.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                finish();
                MessageEvent msg= new MessageEvent();
                msg.setMsg("HELLO");
                EventBus.getDefault().post(msg);
            }
        });
    }
}
